import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Layout',
    component: () => import('@/components/layout/index.vue'),
    redirect: '/index',
    children: [
      {
        path: '/index',
        name: 'Index',
        component: () => import('@/views/index/index.vue')
      }, {
        path: '/room/list',
        name: 'room',
        component: () => import('@/views/room/index.vue')
      }, {
        path: '/update',
        name: 'Update',
        component: () => import('@/views/update/index.vue')
      }, {
        path: '/helper',
        name: 'Helper',
        component: () => import('@/views/helper/index.vue')
      }, {
        path: '/helper/detail',
        name: 'HelperDetail',
        component: () => import('@/views/helper/detail.vue')
      }, {
        path: '/money',
        name: 'Monet',
        component: () => import('@/views/money/index.vue')
      }, {
        path: '/designer',
        name: 'Designer',
        component: () => import('@/views/designer/index.vue')
      }, {
        path: '/room/detail',
        name: 'roomDetail',
        component: () => import('@/views/room/detail.vue')
      }, {
        path: '/my/follow',
        name: 'Follow',
        component: () => import('@/views/myFollow/index.vue')
      }, {
        path: '/money/release',
        name: 'Release',
        component: () => import('@/views/release/index.vue')
      }, {
        path: '/money/list',
        name: 'moneyList',
        component: () => import('@/views/moneyList/index.vue')
      }, {
        path: '/money/detail',
        name: 'moneyDetail',
        component: () => import('@/views/moneyDetail/index.vue')
      }, {
        path: '/recharge/index',
        name: 'recharge',
        component: () => import('@/views/Recharge/index.vue')
      }, {
        path: '/vipList/index',
        name: 'vipList',
        component: () => import('@/views/vip/index.vue')
      }, {
        path: '/usersetting/index',
        name: 'userSet',
        component: () => import('@/views/userStting/index.vue')
      }

    ],
  }, {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue')
  }, {
    path: '/register',
    name: 'Register',
    component: () => import('@/views/register/index.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router